<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        div{
            width: 400px;
            height: 400px;
            border: 1px solid red;
        }
        .pic{
             transform: rotate(60deg);
            -webkit-transform:rotate(60deg);
        }

    </style>
</head>
<body>
<div id="box">
    <img   src="img/tx.jpg" id="image"/>
</div>
<input type="button" value="进行旋转" onclick="fn()">
<script type="text/javascript">
    function fn(){
        var image=document.getElementById("image");
        image.className="pic";
    }
</script>
</body>
</html>